﻿using System;
using System.Drawing;
using System.Windows.Forms;
using CloudShot.Properties;

namespace CloudShot.Controls
{
  public class CancelButton : Button
  {
    public CancelButton()
    {
      FlatStyle = FlatStyle.Flat;
      FlatAppearance.BorderSize = 0;
      FlatAppearance.BorderColor = Color.FromArgb(152, 152, 152);
      FlatAppearance.CheckedBackColor = Color.FromArgb(126, 172, 241);
      FlatAppearance.MouseDownBackColor = Color.FromArgb(193, 55, 55);
      FlatAppearance.MouseOverBackColor = Color.FromArgb(217, 65, 65);
      Image = Resources.upload_cancel;
    }

    protected override void OnMouseEnter(EventArgs e)
    {
      base.OnMouseEnter(e);

      Image = Resources.upload_cancel_white;
    }

    protected override void OnMouseLeave(EventArgs e)
    {
      base.OnMouseLeave(e);

      Image = Resources.upload_cancel;
    }
  }
}